﻿using SlimDX.D3DCompiler;
using System.IO;

namespace InsTron
{
    class HlslIncludeHandler : Include
    {
        const string includeDir = "shaders\\";

        public void Open(IncludeType type, string fileName, Stream parentStream, out Stream stream)
        {
            stream = new FileStream(includeDir + fileName, FileMode.Open);
            stream.Seek(3, SeekOrigin.Begin);
        }

        public void Close(Stream stream)
        {
            stream.Close();
        }
    }
}
